fix(hooks): adds event name inference to fix missing captures#2478
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2478 +/- ##
==========================================
- Coverage 82.75% 82.75% -0.01%
==========================================
Files 154 154
Lines 20843 20843
Branches 13 13
==========================================
- Hits 17249 17248 -1
- Misses 3592 3593 +1
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
jkim323
left a comment
There was a problem hiding this comment.
Thanks Vy for this PR!! Left a couple of comments for you take a look at.
|
@jkim323 thanks for the review! ready for another look |
katriendg
left a comment
There was a problem hiding this comment.
Thanks for this — the fix cleanly addresses both halves of #2475 (nested-hook discovery via chat.hookFilesLocations, and CLI event recovery via shape inference), and the test coverage plus the schema/validator/docs sync are excellent. Both test suites pass locally (54 Python, 22 Pester).
A few non-blocking notes:
- The
sessionEndalias moved fromStoptoSessionEnd. Could you confirm the report/aggregation consumers (not in this diff) don't count onevent == "Stop"for session-end semantics? - Consider documenting the
chat.hookFilesLocationsrequirement for nested hook directories indocs/contributing/hooks.md— it's half the root cause and future contributors would benefit.
Approving with comments — nothing here blocks merge.
🤖 AI-assisted review (code-review). Findings must be independently validated by a qualified human reviewer.
Pull Request
Description
Related Issue(s)
Fixes #2475
Type of Change
Select all that apply:
Code & Documentation:
Infrastructure & Configuration:
AI Artifacts:
prompt-builderagent and addressed all feedback.github/instructions/*.instructions.md).github/prompts/*.prompt.md).github/agents/*.agent.md).github/skills/*/SKILL.md).github/hooks/*/*.json)evals/)Other:
.ps1,.sh,.py)Testing
Checklist
Required Checks
AI Artifact Contributions
/prompt-analyzeto review contributionprompt-builderreviewRequired Automated Checks
The following validation commands must pass before merging:
npm run lint:mdnpm run spell-checknpm run lint:frontmatternpm run validate:skillsnpm run lint:md-linksnpm run lint:psnpm run eval:lint:schemanpm run plugin:generatenpm run docs:testSecurity Considerations
Additional Notes